package com.tntsl.common.vo;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.apache.http.HttpStatus;

/**
 * @author: LvSongnian
 * @date: 2019/9/5 下午 3:19
 */
@NoArgsConstructor
@AllArgsConstructor
@Getter
@Setter
public class Result<T> {

    private int code;

    private int messageCode;

    private String message;

    private T data;

    public Result(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public Result(String message) {
        this.code = HttpStatus.SC_OK;
        this.message = message;
    }

    public Result(T data) {
        this.code = HttpStatus.SC_OK;
        this.data = data;
    }

}
